#include "standard.h"
#include "central.h"
#include"interface_ada.h"

#include <stdlib.h>
#include <iostream>
#include <string>
#include <ctime>
#include <cstdlib>
#include <time.h>

using namespace std;
int main(int argc, char** argv) {

	Annuaire::client c;
	Annuaire::client c2;
	Annuaire::client c3;
	//Annuaire::numero n;
	Annuaire* pagesjaunes=create_Annuaire();
	Standard::Standard *standard_1 = new Standard();
	Central::Central* cent=create_Central();
	int t=0;
	c.adresse="test";
	c.estMobile=false;
	c.typeAbonnement=1;
	c.infoComptable="re";
	c.repondeurActif=false;
	c.messagerieActive=false;
	c.transfertActif=false;
	c.consomme=0;

	c2.adresse="test";
	c2.estMobile=false;
	c2.typeAbonnement=1;
	c2.infoComptable="re";
	c2.repondeurActif=false;
	c2.messagerieActive=false;
	c2.transfertActif=false;
	c2.consomme=0;

	//	pagesjaunes->ajouter(c);
	//	pagesjaunes->ajouter(c2);


	t=standard_1->abonner(c.adresse, c.estMobile, c.repondeurActif,
			c.messagerieActive, c.transfertActif, 0, c.typeAbonnement,
			c.infoComptable);
	standard_1->connecter(t);
	cout<<standard_1->demanderCommunication(t)<<endl;
	t=standard_1->abonner(c2.adresse, c2.estMobile, c2.repondeurActif,
			c.messagerieActive, c.transfertActif, 0, c2.typeAbonnement,
			c2.infoComptable);
	pagesjaunes=create_Annuaire();

	standard_1->connecter(t);
	int j=standard_1->demanderCommunication(t);
	cout<<j<<endl;
	standard_1->fermerCommunication(j);
	j=standard_1->demanderCommunication(t);
	cout<<j<<endl;
}
